package com.loyal.loyalerp.basedata.action.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;

import com.loyal.loyalerp.basedata.action.mapper.provider.GyActionProvider;
import com.loyal.loyalerp.basedata.action.model.GyAction;
import com.loyal.loyalerp.basedata.action.model.GyActionExample;

@Mapper
public interface GyActionMapper {
	
	//根据actioncode查actionname
	@SelectProvider(type=GyActionProvider.class,method="selectActionNameByActionCode")
	GyAction selectActionNameByActionCode(String actioncode);
	
	//根据actionname查actioncode
	@SelectProvider(type=GyActionProvider.class,method="selectActionCodeByActionName")
	GyAction selectActionCodeByActionName(String actionname);
	
	@Select("select * from gy_action")
	List<GyAction> listGyAction();
	
	@SelectProvider(type=GyActionProvider.class,method="listById")
	String listGyActionById(Integer id);
	
	@SelectProvider(type=GyActionProvider.class,method="listGyaAtion")
	List<GyAction> listSordGyAction(String sidx,String sord);
	
	@SelectProvider(type=GyActionProvider.class,method="findGyAction")
	List<GyAction> findGyAction(String searchField, String searchString, String searchOper);
	
    int countByExample(GyActionExample example);

    int deleteByExample(GyActionExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(GyAction record);

    int insertSelective(GyAction record);

    List<GyAction> selectByExample(GyActionExample example);

    GyAction selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") GyAction record, @Param("example") GyActionExample example);

    int updateByExample(@Param("record") GyAction record, @Param("example") GyActionExample example);

    int updateByPrimaryKeySelective(GyAction record);

    int updateByPrimaryKey(GyAction record);
}